﻿using System;
using System.Linq;
using System.Runtime.Serialization;

namespace LINQPad.OpenAccess.Settings
{
    /// <summary>
    /// Settings for the open access driver
    /// </summary>
    [DataContract( Name = "DriverData", Namespace = "" )]
    [KnownType( typeof( PredefinedConnectionSettings ) )]
    public class DriverSettings
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="DriverSettings" /> class.
        /// </summary>
        public DriverSettings( )
        {
            this.Backend = new BackendSettings( );
            this.Initialization = new InitializationSettings( );
        }

        [DataMember]
        public ConnectionSettings Connection { get; set; }
        [DataMember]
        public InitializationSettings Initialization { get; set; }
        [DataMember]
        public MetadataSourceSettings MetadataSource { get; set; }
        [DataMember]
        public BackendSettings Backend { get; set; }
        [DataMember]
        public string AssemblyQualifiedContextTypeName { get; set; }
    }
}
